'use strict';
import * as Types from '../ActionTypes/action.types';
import DeviceRn from '../Tools/device';
import {ThemeC} from './theme';
/* let themedata = ThemeC.Default;
console.log(themedata);
DeviceRn().storageGet('theme_key').then(data => {
     data!=null?(themedata=data):DeviceRn().storageSave('theme_key',JSON.stringify(themedata));
})
console.log(themedata); 
*/
let init_state = {
    status: 'init', theme: {}
};
export default function Theme(state = init_state, action) {
    switch (action.type) {
        case Types.THEME.CHANGE_THEME:
            return Object.assign(...state, {
                status: 'change',
                theme: action.theme
            });
        default:
            return state;
    }
} 